JOptionPane.showMessageDialog(this, "\nThis program measures the number of frames rendered per second.\nNote that the frame rate is limited by the refresh rate of the monitor.\nTo get the true frame rate you need to disable vertical retrace.\n\nOn Windows(tm) you do this through the Control Panel.\n\nOn Unix set the environment variable OGL_NO_VBLANK\n(i.e. type \"setenv OGL_NO_VBLANK\" at the command prompt)", "Frame Counter", JOptionPane.INFORMATION_MESSAGE);
}
public void destroy() {
u.cleanup();
}
//
// The following allows FPSCounterDemo to be run as an application
// as well as an applet
//
public static void main(String[] args) {
FPSCounterDemo fp = new FPSCounterDemo();
fp.parseArgs(args);
JMainFrame frame = new JMainFrame(fp, 256, 256);
}
/** Parses the commandline for the various switches to set the FPSCounter
* variables.
* All arguments are of the form <i>-name value</i>.
* All -name arguments can be shortened to one character. All the value
* arguments take a number. The arguments accepted are :
* <ul>
* <li>warmupTime : Specifies amount of time the FPSCounter should wait
* for the HotSpot<sup><font size="-2">TM</font></sup> VM to perform
* initial optimizations. Specified in milliseconds<br>
* <li>loopCount : Specifies the number of sampling intervals over which
* the FPSCounter should calculate the aggregate and average frame rate.
* Specified as a count. <br>
* <li>maxLoops : Specifies that the FPSCounter should run for only
* these many sampling intervals. Specified as number. If this argument
* is not specified, the FPSCounter runs indefinitely. <br>
System.out.println("Usage : FPSCounterDemo [-name value]\n All arguments are of the form -name value. All -name arguments can be shortened to one character. All the value arguments take a number. The arguments accepted are :\n warmupTime : Specifies amount of time the FPSCounter should wait for the HotSpot(tm) VM to perform initial optimizations. Specified in milliseconds\n loopCount : Specifies the number of sampling intervals over which the FPSCounter should calculate the aggregate and average frame rate. Specified as a count\n maxLoops : Specifies that the FPSCounter should run for only these many sampling intervals. Specified as number. If this argument is not specified, the FPSCounter runs indefinitely.\n help : Prints this message.");